package com.jch.helloworld.configBeans.annotation1;


import com.jch.helloworld.configBeans.annotation1.service.DemoAnnotation1Service;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestMain {

    public static void main(String[] args) {

        ApplicationContext ctx = new ClassPathXmlApplicationContext("/beans/beans-annotation.xml");

        // 获取@Service 注解的类
        DemoAnnotation1Service demoAnnotation1Service = (DemoAnnotation1Service) ctx.getBean("demoAnnotation1Service");
        System.out.println(demoAnnotation1Service);

    }

}
